<%@page contentType="text/html; charset=utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>系统首页</title>
		<link rel="stylesheet"  href="${basePath}css/styles.css"/>
		<link rel="stylesheet"  href="${basePath}css/font-awesome-4.7.0/css/font-awesome.min.css"/>
		<script  src="${basePath}js/jquery-3.6.0.js" type="text/javascript"></script>

	</head>
	<body>
		<div class="dingbu">
			<div class="logo">
			</div>
				<div class="admia">
					<i class="fa fa-caret-down point"></i>
					<i class="fa fa-user"></i>
					<c:if test="${type == 0}">${user.name}</c:if>
					<c:if test="${type == 1}">${user.name}</c:if>
					<ul>
						<li><a target="mainFrame" href="info.jsp">个人信息</a></li>
						<li><a target="mainFrame" href="pwd.jsp">修改密码</a></li>
						<li><a href="javascript:void(0)" class = "logout">退出登录</a></li>
					</ul>
				</div>
			
		</div>
		<div class="zuobian">
			<div class="title"	>
				<i class="fa fa-home"></i>
				
				系统功能
			</div>
			<div class="caidan">
				<c:if test="${type == 1}">
				<p class="zhankai">
					<i class="fa fa-info-circle"></i>
					<i class="fa fa-angle-right point"></i>
					管理员权限
				</p>
				<ul class="beizhankai">
					<li>
						<a href ="javascript:void(0);" url = "${basePath}caozuoyuan?method=list" title="操作员管理">
						<i class = "fa fa-caret-right"></i>
						操作员管理</a>
					</li>
					<li>
						<a href ="javascript:void(0);" url = "${basePath}gdzc?method=list" title="固定资产管理">
						<i class = "fa fa-caret-right"></i>
						固定资产管理</a>
						</li>
					<li>
						<a href ="javascript:void(0);" url = "${basePath}wbw?method=list" title="维护、报废与外借">
						<i class = "fa fa-caret-right"></i>
						维护、报废与外借	</a>
						</li>
				</ul>
				<p>
					<i class="fa fa-info-circle"></i>
					<i class="fa fa-angle-right point"></i>
					统计图表
				</p>
				<ul>
					<li>
						<a target="mainFrame" href="echarts.jsp" title="数据图表">
						<i class = "fa fa-caret-right"></i>
						数据图表</a>
					</li>
				</ul>
				<p>
					<i class="fa fa-info-circle"></i>
					<i class="fa fa-angle-right point"></i>
					系统设置
				</p>	
				<ul>
					<li>
						<a target="mainFrame" href="info.jsp" title="个人信息">
						<i class = "fa fa-caret-right"></i>
						个人信息</a>
					</li>
					<li>
						<a target="mainFrame" href="pwd.jsp" title="修改密码">
						<i class = "fa fa-caret-right"></i>
						修改密码</a>
					</li>
					<li>
						<a href="javascript:void(0)" class = "logout" title="退出登录">
						<i class = "fa fa-caret-right"></i>
						退出登录</a>
					</li>
				</ul>
				</c:if>
				<c:if test="${type == 0}">
				<p>
					<i class="fa fa-info-circle"></i>
					<i class="fa fa-angle-right point"></i>
					操作员权限
				</p>	
				<ul>
					<li>
						<a href ="javascript:void(0);" url = "${basePath}gdzc?method=list" title="固定资产管理">
						<i class = "fa fa-caret-right"></i>
						固定资产管理</a>
					</li>
					<li>
						<a href ="javascript:void(0);" url = "${basePath}wbw?method=list" title="维护、报废与外借">
						<i class = "fa fa-caret-right"></i>
						维护、报废与外借</a>
					</li>
				</ul>
				<p>
					<i class="fa fa-info-circle"></i>
					<i class="fa fa-angle-right point"></i>
					统计图表
				</p>
				<ul>
					<li>
						<a target="mainFrame" href="echarts.jsp" title="数据图表">
						<i class = "fa fa-caret-right"></i>
						数据图表</a>
					</li>
				</ul>
				
				<p>
					<i class="fa fa-info-circle"></i>
					<i class="fa fa-angle-right point"></i>
					系统设置
				</p>	
				<ul>
					<li>
						<a target="mainFrame" href="info.jsp" title="个人信息">
						<i class = "fa fa-caret-right"></i>
						个人信息</a>
					</li>
					<li>
						<a target="mainFrame" href="pwd.jsp" title="修改密码">
						<i class = "fa fa-caret-right"></i>
						修改密码</a>
					</li>
					<li>
						<a href="javascript:void(0)" class = "logout" title="退出登录">
						<i class = "fa fa-caret-right"></i>
						退出登录</a>
					</li>
				</ul>
				</c:if>
	
			</div>
			
		</div>
		<div class="youbian">
			<div class="location">
				<i class="fa fa-home"></i>
				<span class="caidanbiaoti">欢迎使用</span>
			</div>
			<iframe src = "main.jsp" width = 100% height= 91% frameborder = 0px name="mainFrame"  id="mainFrame" class="mainFrame"></iframe>
		</div>
		<script type="text/javascript">
			$(function(){
				$('.caidan p').click(function(){
					$(this).siblings('ul').slideUp(200);
					$(this).next('ul').slideToggle(200);
				});
			})

			$('.caidan ul a').click(function(){
				$('iframe').attr("src",$(this).attr("url"))
				$('.caidanbiaoti').html($(this).attr("title"));
			});
			$('.logout').click(function(){
				if(confirm("是否确定退出")){
					window.location.href = "logout";
				}
			});
		</script>
		

	</body>
</html>
